1. Field of Invention
The present invention relates to visual processing devices, in particular to visual processing devices that perform gradation processing of an image signal. Separate aspects of the invention relate to visual processing methods, visual processing programs, and semiconductor devices.
2. Description of the Related Art
Spatial processing and gradation processing are known as techniques for visually processing image signals of an original image.
Spatial processing is the processing of a target pixel to be processed using the pixels surrounding that target pixel. Further, the technique of using an image signal that has been subjected to spatial processing to perform contrast enhancement or dynamic range (DR) compression, for example, of an original image is known. With contrast enhancement, the difference between the original image and the blur signal (the sharp component of the image) is added to the original image, sharpening the image. With DR compression, a portion of the blur signal is subtracted from the original image, compressing the dynamic range.
Gradation processing is processing in which a lookup table (LUT) is used to transform a pixel value for each target pixel without regard for the pixels around the target pixel, and is also referred to as “gamma correction.” For example, in the case of contrast enhancement, transformation of the pixel value is performed using a LUT that produces a gradation of gray levels that appear frequently (whose area is large) in the original image. Well-known examples of gradation processing using a LUT include gradation processing in which a single LUT is chosen and used for the entire original image (histogram equalization) and gradation processing in which the original image is partitioned into a plurality of image regions and a LUT is chosen and used for each image region (local histogram equalization) (for example, see JP 2000-57335A (pg. 3, FIGS. 13 to 16)).
An example of gradation processing in which an original image is partitioned into a plurality of image regions and a LUT is chosen and used for each image region is described using FIGS. 33 to 36.
FIG. 33 shows a visual processing device 300 that partitions an original image into a plurality of image regions and chooses a LUT to use for each image region. The visual processing device 300 is provided with an image partitioning portion 301 that partitions an original image that has been input as an input signal IS into a plurality of image regions Sm (1≦m≦n; where n is the number of partitions of the original image), a gradation transformation curve derivation portion 310 that derives a gradation transformation curve Cm for each image region Sm, and a gradation processing portion 304 that obtains the gradation transformation curves Cm and subjects each image region Sm to gradation processing and outputs the result as an output signal OS. The gradation transformation curve derivation portion 310 comprises a histogram creation portion 302 that creates a brightness histogram Hm for each image region Sm, and a gradation curve creation portion 303 that creates a gradation transformation curve Cm for each image region Sm from the brightness histogram Hm that has been created.
The operations of these portions are described using FIGS. 34 to 36. The image partitioning portion 301 partitions an original image that has been received as an input signal IS into a plurality (n) of image regions (see FIG. 34(a)). The histogram creation portion 302 creates a brightness histogram Hm for each image region Sm (see FIG. 35). Each brightness histogram Hm shows the distribution of the brightness values of all pixels in an image region Sm. That is, the horizontal axes in the brightness histograms Hm shown in FIG. 35(a) to (d) show the brightness level of the input signal IS and the vertical axes show the pixel number. The gradation curve creation portion 303 cumulates the “pixel number” of the brightness histogram Hm in the order of their brightness and this cumulative curve is taken as a gradation transformation curve Cm (see FIG. 36). In the gradation transformation curve Cm shown in FIG. 36, the horizontal axis shows the brightness value of the pixels of the image region Sm in the input signal IS, and the vertical axis shows the brightness value of the pixels of the image region Sm in the output signal OS. The gradation processing portion 304 obtains the gradation transformation curve Cm and transforms the brightness value of the pixels in the image region Sm in the input signal IS based on the gradation transformation curve Cm. By doing this, a gradient is established between the most frequent gradations in each block, and this increases the sense of contrast for each block.